import echarts from '@/echarts'

import { years } from '@/views/screens/PovertyData/comps/right-top-bar/constant'

import { moneyData } from '../../constant'

let fontColor = '#fff'
let fontSize = 15
export const option = {
    color: [
        '#bf19ff',
        '#854cff',
        '#5f45ff',
        '#02cdff',
        '#0090ff',
        '#f9e264',
        '#f47a75',
        '#009db2',
        '#0780cf',
        '#765005'
    ],
    textStyle: {
        fontSize: 18
    },
    title: {
        text: '各级财政投入扶贫专项资金',
        x: 'center',
        top: '2%',
        textStyle: {
            color: fontColor,
            align: 'center',
            fontSize: 20
        }
    },
    grid: {
        left: '2%',
        right: '4%',
        bottom: '1%',
        top: '25%',
        containLabel: true
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow',
            label: {
                show: true,
                backgroundColor: '#333'
            }
        }
    },
    legend: {
        show: true,
        x: 'center',
        top: '10%',
        textStyle: {
            color: fontColor,
            fontSize: 12
        },
        data: ['中央', '自治区', '旗县区', '整合资金', '其他']
    },
    xAxis: [
        {
            type: 'category',
            boundaryGap: false,
            axisLabel: {
                color: fontColor
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#397cbc'
                }
            },
            data: years
        }
    ],
    yAxis: [
        {
            type: 'value',
            name: '亿元',
            offset: 8,
            splitLine: {
                show: true,
                lineStyle: {
                    color: '#0a3256'
                }
            },
            axisLine: {
                lineStyle: {
                    color: fontColor
                }
            }
        }
    ],
    series: [
        {
            name: '中央',
            type: 'line',
            symbolSize: 8,
            label: {
                show: true,
                position: 'top',
                fontSize,
                color: fontColor
            },
            data: moneyData.centre
        },
        {
            name: '自治区',
            type: 'line',
            symbol: 'circle',
            symbolSize: 8,
            label: {
                show: true,
                position: 'top',
                fontSize,
                color: fontColor
            },
            data: moneyData.municipality
        },
        {
            name: '旗县区',
            type: 'line',
            symbol: 'circle',
            symbolSize: 8,
            label: {
                show: true,
                position: 'top',
                fontSize,
                color: fontColor
            },
            data: moneyData.bannerCounty
        },
        {
            name: '整合资金',
            type: 'line',
            symbol: 'circle',
            symbolSize: 8,
            label: {
                show: true,
                position: 'top',
                fontSize,
                color: fontColor
            },
            data: moneyData.mixMoney
        },
        {
            name: '其他',
            type: 'line',
            symbol: 'circle',
            symbolSize: 8,
            label: {
                show: true,
                position: 'top',
                fontSize,
                color: fontColor
            },

            data: moneyData.otherMoney
        }
    ]
} as any

export default echarts
